﻿<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="users.aspx.cs" Inherits="admin_users" Title="Quản lý người dùng" %>

<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
<rad:RadGrid ID="grdUsers" runat="server" Width="100%" Skin="Telerik" AutoGenerateColumns="False" GridLines="None" AllowPaging="True" AllowSorting="True" EnableAJAX="True" EnableAJAXLoadingTemplate="True" PageSize="3" ShowStatusBar="True" OnNeedDataSource="grdUsers_NeedDataSource" OnUpdateCommand="grdUsers_UpdateCommand" OnDeleteCommand="grdUsers_DeleteCommand" LoadingTemplateTransparency="25">
<MasterTableView DataKeyNames="UserID">
<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
    <Columns>
        <rad:GridEditCommandColumn ButtonType="ImageButton">
        </rad:GridEditCommandColumn>
        <rad:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ImageUrl="~/RadControls/Grid/Skins/Telerik/Delete.gif"
            UniqueName="column">
        </rad:GridButtonColumn>
        <rad:GridBoundColumn DataField="UserID" HeaderText="T&#234;n đăng nhập" ReadOnly="True"
            UniqueName="UserID">
            <ItemStyle HorizontalAlign="Left" />
        </rad:GridBoundColumn>
        <rad:GridBoundColumn DataField="FullName" HeaderText="Họ t&#234;n" UniqueName="FullName">
            <ItemStyle HorizontalAlign="Left" />
        </rad:GridBoundColumn>
        <rad:GridBoundColumn DataField="DateOfBirth" DataFormatString="{0:d}" DataType="System.DateTime"
            HeaderText="Ng&#224;y sinh" UniqueName="DateOfBirth">
            <ItemStyle HorizontalAlign="Left" />
        </rad:GridBoundColumn>
        <rad:GridBoundColumn DataField="Address" HeaderText="Địa chỉ" UniqueName="Address" EditFormColumnIndex="1">
            <ItemStyle HorizontalAlign="Left" />
        </rad:GridBoundColumn>
        <rad:GridBoundColumn DataField="Email" HeaderText="Email" UniqueName="Email" EditFormColumnIndex="1">
            <ItemStyle HorizontalAlign="Left" />
        </rad:GridBoundColumn>
        <rad:GridCheckBoxColumn DataField="Disabled" DataType="System.Boolean" HeaderText="Kho&#225;"
            UniqueName="Disabled">
            <HeaderStyle HorizontalAlign="Center" Width="35px" />
        </rad:GridCheckBoxColumn>
    </Columns>
    <EditFormSettings CaptionDataField="UserID" CaptionFormatString="Chỉnh sửa th&#244;ng tin người d&#249;ng {0}"
        EditFormType="Template">
        <EditColumn ButtonType="ImageButton" UpdateImageUrl="~\RadControls\Grid\Skins\Telerik\Update.gif" CancelImageUrl="~\RadControls\Grid\Skins\Telerik\Cancel.gif" UniqueName="EditCommandColumn1" />
        <FormTemplate>
            <table border="0" cellpadding="2" cellspacing="0" style="width: 600px">
                <tr>
                    <td align="left" style="width: 20px; height: 24px">
                    </td>
                    <td align="left" style="width: 98px; height: 24px">
                        Tên đăng nhập:</td>
                    <td align="left" style="width: 250px;"><strong>
                        <asp:Label ID="lblUserID" runat="server" Text='<%# Eval("UserID") %>'></asp:Label></strong></td>
                    <td align="left">
                    </td>
                </tr>
                <tr>
                    <td align="left" style="width: 20px; height: 24px">
                    </td>
                    <td style="width: 98px; height: 24px;" align="left">Họ tên:</td>
                    <td style="width: 250px;" align="left">
                        <rad:RadTextBox ID="txtFullName" runat="server" LabelCssClass="radLabelCss_Default"
                            Skin="Vista" Text='<%# Bind("FullName") %>' Width="200px">
                        </rad:RadTextBox></td>
                    <td align="left">
                        <asp:CheckBox ID="chkDisabled" runat="server" Checked='<%# Bind("Disabled") %>' Text="Bị khoá" /></td>
                </tr>
                <tr>
                    <td align="left" style="width: 20px; height: 26px">
                    </td>
                    <td style="width: 98px; height: 26px;" align="left">Ngày sinh:</td>
                    <td style="width: 250px;" align="left">
                        <rad:RadDatePicker ID="rdpDateOfBirth" runat="server" Culture="English (United States)"
                            SelectedDate='<%# Bind("DateOfBirth") %>' Skin="Vista" Width="200px">
                            <Calendar Skin="Vista">
                            </Calendar>
                            <DateInput Skin="Vista">
                            </DateInput>
                        </rad:RadDatePicker>
                    </td>
                    <td align="left">
                    </td>
                </tr>
                <tr>
                    <td align="left" style="width: 20px; height: 24px">
                    </td>
                    <td align="left" style="width: 98px; height: 24px">
                        Email:</td>
                    <td align="left" style="width: 250px;">
                        <rad:RadTextBox ID="txtEmail" runat="server" LabelCssClass="radLabelCss_Default"
                            Skin="Vista" Text='<%# Bind("Email") %>' Width="200px">
                        </rad:RadTextBox></td>
                    <td align="left">
                    </td>
                </tr>
                <tr>
                    <td align="left" style="width: 20px">
                    </td>
                    <td align="left" style="width: 98px">
                        Địa chỉ:</td>
                    <td align="left" style="width: 250px">
                        <rad:RadTextBox ID="txtAddress" runat="server" LabelCssClass="radLabelCss_Default" Skin="Vista" Text='<%# Bind("Address") %>' Width="200px">
                        </rad:RadTextBox></td>
                    <td align="left">
                    </td>
                </tr>
                <tr>
                    <td align="left" style="width: 20px">
                    </td>
                    <td align="left" style="width: 98px">
                    </td>
                    <td align="left" style="width: 250px">
                    </td>
                    <td align="left">
                    </td>
                </tr>
                <tr>
                    <td align="left" style="width: 20px">
                    </td>
                    <td align="left" style="width: 98px">
                    </td>
                    <td align="left" style="width: 250px">
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/RadControls/Grid/Skins/Telerik/Update.gif"
                            ToolTip="Lưu" CommandName="Update" />
                        <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/RadControls/Grid/Skins/Telerik/Cancel.gif"
                            ToolTip="Huỷ" CommandName="Cancel" /></td>
                    <td align="left">
                    </td>
                </tr>
            </table>
        </FormTemplate>
    </EditFormSettings>
</MasterTableView>
                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <PagerStyle HorizontalAlign="Left" Mode="NextPrevAndNumeric" PagerTextFormat="Trang: {4} &amp;nbsp;|&amp;nbsp; Đang đứng tại trang {0} / {1}, d&#242;ng {2} đến {3} / {5}." />
</rad:RadGrid>
</asp:Content>

